In recent years, a spin transfer torque type Magnetoresistive Random Access Memory (STT-MRAM) is proposed as a semiconductor memory. An MRAM contains a magnetoresistive effect element in a memory cell. A magnetoresistive effect element includes two magnetic layers (ferromagnetic layers) and a nonmagnetic layer provided therebetween. Data of “1” or “0” is stored in a memory cell depending on a magnetized state of the two magnetic layers of the magnetoresistive effect element, that is, whether spin orientations of the two magnetic layers are parallel or antiparallel.